package com.sc.mapper;

import com.github.pagehelper.Page;
import com.sc.domain.Floor;
import com.sc.dto.FloorPageDto;
import com.sc.vo.FloorPageVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface FloorMapper {
    boolean addFloor(Floor floor);
    @Delete("delete from rui_floor where id=#{id}")
    boolean deleteFloor(Integer id);
    @Select("select * from rui_floor where id = #{id}")
    Floor get(Integer id);

    boolean updateFloor(Floor floor);

    Page<FloorPageVo> findFloorPage(FloorPageDto floorPageDto);

    Page<FloorPageVo> fuzzyQuery(FloorPageDto floorPageDto);

    boolean deleteByList(List<Integer> ids);
    @Select("select name, unit_num from rui_floor")
    List<FloorPageVo> select();
}
